package keter.dao;

import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.util.EntityUtils;
import org.hibernate.engine.spi.SessionImplementor;
import org.hibernate.id.UUIDHexGenerator;

public class Variables {
	public static boolean isPalindrome(String s) {
		String t = "";
        for (int i = s.length()-1; i >=0 ; i--) {
			t=t.concat(s.charAt(i)+"");
		}
        if(t.equals(s)){
        	return true;
        }
        return false;
    }  
	public final static void main(String[] args) throws Exception {
		System.out.println(isPalindrome("abcba"));
		System.out.println(isPalindrome("abcb"));
		  
		  SessionImplementor session = null;
		  UUIDHexGenerator uuid = new UUIDHexGenerator();
		  for (int i = 0; i < 10; i++) {
			  System.out.println(uuid.generate(session, "haha"));
		}
		  
		  
//	        CloseableHttpClient httpclient = HttpClients.createDefault();
//	        String baseUrl = "http://fun.coolshell.cn/n/";
//	        String num = "1598";
//	        try {
//	        	while(true){
//	        		HttpGet httpget = new HttpGet(baseUrl+num);
//	 	            System.out.println("Executing request " + httpget.getRequestLine());
//	 	            String responseBody = EntityUtils.toString(httpclient.execute(httpget).getEntity());
//	 	            System.out.println(responseBody);
//	 	            num  = responseBody;
//	        	}
//	           
//
//	        } finally {
//	            httpclient.close();
//	        }
	    }
}
